import java.util.*;
    public class 统计输入正数个数 {
        public static void main(String[] args) {
            int count = 0;
            Scanner scanner = new Scanner(System.in);
//            while(scanner.nextInt()>0)
//                count++;
//            System.out.println(count);


            while(true)
            {
                if(scanner.nextInt()<=0)
                    break;
                if(!scanner.hasNextInt())
                    break;
                count++;
            }
            System.out.println(count);
        }
    }

